import os.path
import wx

class DropTarget(wx.FileDropTarget):
	def __init__(self, window):
		wx.FileDropTarget.__init__(self)
		self.window = window
		
	def OnDropFiles(self, x, y, filenames):
		for file in filenames:
			if os.path.isfile(file):
				self.openFile(file)
			elif os.path.isdir(file):
				self.addDirectory(file)
				
	def openFile(self, filePath):
		print 'file dropped'
		#self.window.openFileToNewTab(file)
		pass
	
	def addDirectory(self, dirPath):
		print 'directory dropped'
		#self.window.AddItem(file, True, False, False)
		pass
